package br.feevale.jogo.util;

public enum AgenteEnum {
	
	RAPOSA("R", "Raposa"),
	GANSO("G", "Ganso");
	
	private String key;
	private String meaning;
	
	AgenteEnum(String key, String meaning) {
		this.key = key;
		this.meaning = meaning;
	}
	
	public String getKey() {
		return key;
	}
	
	public String getMeaning() {
		return meaning;
	}
	
	public static AgenteEnum getValue(String key) {
		AgenteEnum agente = null;
		
		if ("R".equals(key)) {
			agente = RAPOSA;
		} else if ("G".equals(key)) {
			agente = GANSO;
		} else {
			agente = null;
		}
		
		return agente;
	}
	
}
